var releaseVer = '18934,8380646001111111111111111';

define(function(require, exports) {
    var init = function(filename) {
        require("jquery");
        var mods = filename.split(',');
        var modName;
        for(var i in mods){
            modName = mods[i];
            if (modName) {
                console.log('./dist/' + modName + '.js?t='+releaseVer);
                require.async('./dist/' + modName + '.js?t='+releaseVer, function(mod) {
                    if (mod && mod.init) {
                        mod.init();
                    }
                });
            }
        }
    };
    exports.init = init;
});
(function(){
    var alias = {
        'ui':'/js/xcx/ui',
        'jquery':'/js/xcx/jquery-2.1.1.min',

        //ui
        'jMinEmoji':'public/ui/jMinEmoji/factory',
        'jMinEmojiCss':'public/ui/jMinEmoji/css/minEmoji.css',
        //util
        'mustache':'public/util/mustache/factory',
        'uri':'public/util/uri/factory',
        'easing':'public/util/easing/factory',
        // 'uploader':'public/util/uploader/factory',
        'uploader':'/js/xcx/uploader/factory',
        'jvForm':'public/util/jvForm/factory',
        'moment':'public/util/moment/factory',
        'juicer': '/js/xcx/juicer/factory',
        'fastclick': 'public/util/fastclick/factory',
        'highcharts':'public/ui/highcharts/factory',
        'highcharts-wap':'public/ui/highcharts-wap/factory',
        'touchJs': 'public/util/touchJs/factory',
        'decimal': 'public/util/decimal/factory',
        'scrollbar':'public/ui/scrollbar/factory',
        'scrollbarCss':'public/ui/scrollbar/jquery.mCustomScrollbar.css',
        'fancybox':'public/ui/fancybox/factory',
        'fancyboxCss':'public/ui/fancybox/jquery.fancybox.css',
        //common
        'location': 'dist/util/location',
        // 'locationV2': 'dist/util/location_v2',
        'locationV2': '/js/xcx/location_v2',
        // 'ui':'dist/ui.js',
        'store-ui': 'dist/store/common'
    };
    console.log(alias);
    seajs.config({
        alias: alias,
        base: 'http://127.0.0.1/js/',
        // base: '/js/xcx/',
        map: [
            [/^(.*\/js\/(.*)\/.*\.(?:css|js))(?:.*)$/i, '$1?'+releaseVer]
        ]
    });
    console.log(seajs.config());
})();
